class Animal(object):
    def __init__(self, voice):
        self.voice = voice

    def speak(self):
        print(self.voice)


class Cat(Animal):
    def __init__(self, voice):
        super().__init__(voice)
        self.voice = voice


class Dog(Animal):
    def __init__(self, voice):
        super().__init__(voice)
        self.voice = voice


animal = Animal('么么')
animal.speak()
cat = Cat('喵喵')
cat.speak()
dog = Dog('汪汪')
dog.speak()
